<template>
  <nm-form-dialog ref="form" v-bind="form" v-on="on" :visible.sync="visible_">
    <el-row>
      <el-col :span="20" :offset="1">
        <el-form-item label="名称：" prop="agency_name">
          <el-input v-model="form.model.agency_name" clearable />
        </el-form-item>
        <el-form-item label="简拼：" prop="pinyin">
          <el-input v-model="form.model.pinyin" clearable />
        </el-form-item>
        <el-form-item label="类型：" prop="agency_type">
          <el-input v-model="form.model.agency_type" clearable />
        </el-form-item>
        <el-form-item label="所属客运站：" prop="station_id">
          <el-input v-model="form.model.station_id" clearable />
        </el-form-item>
        <el-form-item label="所属区域：" prop="area_id">
          <el-input v-model="form.model.area_id" clearable />
        </el-form-item>
        <el-form-item label="级别：" prop="agency_level">
          <el-input v-model="form.model.agency_level" clearable />
        </el-form-item>
        <el-form-item label="地址：" prop="agency_address">
          <el-input v-model="form.model.agency_address" clearable />
        </el-form-item>
      </el-col>
    </el-row>
  </nm-form-dialog>
</template>
<script>
import { mixins } from 'netmodular-ui'

const { add, edit, update } = $api.dispatch.agency

export default {
  mixins: [mixins.formSave],
  data() {
    return {
      title: '代售点',
      actions: { add, edit, update },
      form: {
        model: {
          /** 名称 */
          agency_name: '',
          /** 简拼 */
          pinyin: '',
          /** 类型 */
          agency_type: '',
          /** 所属客运站 */
          station_id: '',
          /** 所属区域 */
          area_id: '',
          /** 级别 */
          agency_level: '',
          /** 地址 */
          agency_address: ''
        },
        rules: {}
      }
    }
  }
}
</script>
